import { app } from "../../../base";
import { NetManager } from "../../../app_base/module/net/NetManager";
import { BaseProtocolHelper } from "../../../app_base/module/net/socket/BaseProtocolHelper";

/**
 * 脚本自动生成的Socket协议发送接口类
 */
export default class ProtocolHelper extends BaseProtocolHelper {
    static KEY: string = NetManager.PROTOCOL_HELPER_KEY;
    public CG_ASK_LOGIN(account: string, timestamp: number, authkey: string, lang: string, region: string, ip: string, params: string) {
        this.output.pos = 4;
        this.output.writeUTFString(account);
        this.output.writeInt32(timestamp);
        this.output.writeUTFString(authkey);
        this.output.writeUTFString(lang);
        this.output.writeUTFString(region);
        this.output.writeUTFString(ip);
        this.output.writeUTFString(params);
        return this.flush(56, arguments);
    }
}